﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
using FamilyShowSource.Models;
using System.Windows.Input;

namespace FamilyShowSource
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public const string ApplicationFolderName = "Family.Show";
        public const string AppDataFolderName = "CurrentFamily";
        public static PeopleCollection Family = new PeopleCollection();

        /// <summary>
        /// Return the animation duration. The duration is extended
        /// if special keys are currently pressed (for demo purposes)  
        /// otherwise the specified duration is returned. 
        /// </summary>
        public static TimeSpan GetAnimationDuration(double milliseconds)
        {
            return TimeSpan.FromMilliseconds(
                Keyboard.IsKeyDown(Key.F12) ?
                milliseconds * 5 : milliseconds);
        }
    }
}
